package com.platform.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.platform.comm.constants.GlobalConstant;
import com.platform.enums.CommFlagType;
import com.platform.comm.dto.BaseQo;
import com.platform.comm.enums.YnEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;
import java.util.List;

/**
 * Description: 用户DTO
 *
 * @author libin Created on 2019/7/16
 **/
@EqualsAndHashCode(callSuper = true)
@Data
public class UserDetail extends BaseQo {

    private static final long serialVersionUID = 177202019071049240L;
    private String username;
    private String userType;
    private String realName;
    private String password;
    private String mobile;
    private String email;
    private Integer pwdLimitDays;
    @JsonFormat(pattern = GlobalConstant.DATE_TIME_PATTERN, shape = JsonFormat.Shape.STRING)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime pwdModifyDate;
    private YnEnum delFlag;
    private CommFlagType status;
    private String remark;
    private String departId;
    private String departName;
    private String departCode;
    private String departFullName;
    private String departKind;
    @JsonFormat(pattern = GlobalConstant.DATE_TIME_PATTERN, shape = JsonFormat.Shape.STRING)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime firstLoginDate;
    private List<RoleQo> roles;
    private String avatarFileId;
}
